<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use App\Models\Traits\Filters;

class Notification extends Model
{
    use Filters;
    
    protected $guarded = []; 

    public function setDataAttribute($value)
    {
        if (is_array($value)) {
            $this->attributes['data'] = json_encode($value);
        }
    }

    public function getDataAttribute($value)
    {
        return json_decode($value, true);
    }




}
